package main

import (
	"fiberAmisAdmin/config"
	"fiberAmisAdmin/routes"
	"github.com/gofiber/fiber/v2"
	"github.com/gofiber/template/html/v2"
)

func main() {
	config.Init()
	// 初始化 Fiber 应用程序
	engine := html.New("./views/admin", ".html")
	engine.Delims("{[{", "}]}") // 指定模板语法的分隔符为 [{[ 和 }]}
	app := fiber.New(fiber.Config{
		Views: engine,
	})
	app.Static("/", "./static/admin")
	// 设置路由
	routes.SetupRoutes(app)
	// 启动服务器
	app.Listen(":3000")
}
